package com.hzcx.app.simplechat.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;

public class MyVideoView extends StandardGSYVideoPlayer {
    private OnLongPressListener longPressListener;
    public MyVideoView(Context context, Boolean fullFlag) {
        super(context, fullFlag);
    }

    public MyVideoView(Context context) {
        super(context);
    }

    public MyVideoView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected void touchLongPress(MotionEvent e) {
        super.touchLongPress(e);
        if (longPressListener!=null){
            longPressListener.onLongPress();
        }
    }

    public void setOnLongPressListener(OnLongPressListener onLongPressListener){
        longPressListener = onLongPressListener;
    }

    public interface OnLongPressListener{
        void onLongPress();
    }

}
